<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../../../component/pear/css/pear.css" />
</head>
<body>
<form class="layui-form" lay-filter="editFilter">
    <div class="mainBox">
        <div class="main-container">
            <div class="main-container">
			
				<div class="layui-form-item">
						<label class="layui-form-label">单位性质</label>
						<div class="layui-input-block">
							<select name="dwxz" disabled="disabled" class="layui-input" required lay-verify="required">
	                        	<option value="">请选择</option>
	                            <option value="区直行政">区直行政</option>
	                            <option value="参公团体">参公团体</option>
	                            <option value="城管大队">城管大队</option>
	                 		</select>
						</div>
				</div>
	
				 <div class="layui-form-item">
					<label class="layui-form-label">单位</label>
					<div class="layui-input-block">
						<select name="dw" class="layui-input" disabled="disabled" required lay-verify="required">
	                        	<option value="">请选择</option>
	                            <option value="总工会">总工会</option>
	                            <option value="统战部">统战部</option>
	                            <option value="市场局">市场局</option>
	                 	</select>
					</div>
				</div>
				
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">编制</label>
					<div class="layui-input-block">
						<input type="text" name="bz" placeholder="请输入编制" disabled="disabled" class="layui-input"/>
					</div>
				</div>
				
				<div class="layui-form-item">
					<label class="layui-form-label">现职务</label>
					<div class="layui-input-block">
						<select name="xgz" class="layui-input" disabled="disabled" required lay-verify="required">
	                        	<option value="">请选择</option>
	                            <option value="副主任">副主任</option>
	                            <option value="副局长">副局长</option>
	                            <option value="局长">局长</option>
	                            <option value="主任">主任</option>
	                            <option value="副区长">副区长</option>
	                            <option value="区长">区长</option>
	                 	</select>
					</div>
				</div>
				
				<div class="layui-form-item">
					<label class="layui-form-label">职务级别</label>
					<div class="layui-input-block">
						<select name="gzdj" class="layui-input" disabled="disabled" required lay-verify="required">
	                        	<option value="">请选择</option>
	                            <option value="二级科员">二级科员</option>
	                            <option value="一级科员">一级科员</option>
	                            <option value="四级主任科员">四级主任科员</option>
	                            <option value="三级主任科员">三级主任科员</option>
	                            <option value="二级主任科员">二级主任科员</option>
	                            <option value="一级主任科员">一级主任科员</option>
	                            <option value="一级主任科员">一级主任科员</option>
	                            <option value="四级调研员">四级调研员</option>
	                            <option value="三级调研员">三级调研员</option>
	                            <option value="二级调研员">二级调研员</option>
	                            <option value="一级调研员">一级调研员</option>
	                 	</select>
					</div>
				</div>
				
				
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">任现职务时间</label>
					<div class="layui-input-block">
					
						<input type="text" name="xgzsj" id="xgzsj" disabled="disabled" placeholder="请输入任现职务时间" class="layui-input"/>
					</div>
				</div>
				
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">任现职级时间</label>
					<div class="layui-input-block">
						<input type="text" name="rxzsij" id="rxzsij" disabled="disabled" placeholder="请输入任现职级时间" class="layui-input"/>
					</div>
				</div>
				
				
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">出生日期</label>
					<div class="layui-input-block">
						<input type="text" name="cssj" id="cssj" disabled="disabled"  placeholder="请选择出生日期" class="layui-input"/>
					</div>
				</div>
				
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">退休时间</label>
					<div class="layui-input-block">
						<input type="text" name="txsj" id="txsj" disabled="disabled"  placeholder="请选择退休时间" class="layui-input"/>
					</div>
				</div>
				
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">县以下并行职级</label>
					<div class="layui-input-block">
						<input type="text" name="xzj" lay-verify="title" disabled="disabled" autocomplete="off" placeholder="请输入县以下并行职级" class="layui-input">
					</div>
				</div>
				
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">套转</label>
					<div class="layui-input-block">
						<input type="text" name="taoz" lay-verify="title" disabled="disabled" autocomplete="off" placeholder="请输入套转" class="layui-input">
					</div>
				</div>
				
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">职位数</label>
					<div class="layui-input-block">
						<input type="text" name="zws" lay-verify="title" disabled="disabled" autocomplete="off" placeholder="请输入职位数" class="layui-input">
					</div>
				</div>
				
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">晋升条件</label>
					<div class="layui-input-block">
						<input type="text" name="jstj" id="jstj" disabled="disabled" lay-verify="title" autocomplete="off" placeholder="请输入晋升条件" class="layui-input">
					</div>
				</div>
				
				 
				<div class="layui-form-item layui-form-text">
					<label class="layui-form-label">备注</label>
					<div class="layui-input-block">
						<textarea name="beiz"  placeholder="请输入备注" disabled="disabled" class="layui-textarea"></textarea>
					</div>
				</div>
         		
            </div>
        </div>
    </div>
</form>
<script src="../../../component/layui/layui.js"></script>
<script src="../../../component/pear/pear.js"></script>
<script>
layui.use(['form','jquery','upload'],function(){
    let form = layui.form;
    let $ = layui.jquery;
    let id = getQueryString("id");
    let upload = layui.upload;
    
    $.ajax({
        url: '/admin/Civil/findDetailById',
        type: 'get',
        data: {"id":id},
        dataType: "json",
        beforeSend: function () {
            //console.log(JSON.stringify(data.field));
        },
        success: function (data) {
            //do something
            if (data.code == 0) {
            	form.val('editFilter',  data.data);
                form.render('select');
            } else {
                layer.alert('抱歉，系统繁忙，请稍后再试！', {icon: 2});
            }
        },
        error: function (data) {
            //do something
            layer.msg('与服务器连接失败', {icon: 2});
        }
    });
    
    form.on('submit(user-save)', function(data){
        data.field.id=id;
        $.ajax({
            url:'/admin/Civil/updateById',
            data:JSON.stringify(data.field),
            dataType:'json',
            contentType:'application/json',
            type:'post',
            success:function(result){
                if(result.success){
                        layer.msg(result.msg,{icon:1,time:1000},function(){
                        parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭当前页
                        parent.layui.table.reload("role-table");
                    });
                }else{
                    layer.msg(result.msg,{icon:2,time:1000});
                }
            }
        })
        return false;
    });
})
</script>
<script>
</script>
</body>
</html>
